package com.cdie.myschool.mapper.TeacherTermReportMapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cdie.myschool.domain.entity.PapersOld;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.ResultSetType;
import org.apache.ibatis.session.ResultHandler;

/**
 * @program:my-school
 * @ClassName:PapersOldMapper
 * @Description:科研信息Old
 * @author:毛康源
 * @data:2022-10-09 10:47
 **/
@Mapper
public interface PapersOldMapper extends BaseMapper<PapersOld> {
    @Select("select * from scientific_papers_info")
    @Options(resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = 1000)
    @ResultType(PapersOld.class)
    @DS("slave_1")
    void getPapersData(ResultHandler<PapersOld> handlerPaper);
}
